﻿using WeiboWPSdk.Json;

namespace WeiboWPSdk.ResponseEntity {
    public class AccessToken : EntityBase {
        [JsonProperty("access_token")]
        public string Token { get; internal set; }
        [JsonProperty("expires_in")]
        public long ExpiresIn { get; internal set; }
        [JsonProperty("uid")]
        public long UId { get; internal set; }
    }

    public class TokenInfo : EntityBase {
        /// <summary>
        /// 授权用户的uid。
        /// </summary>
        [JsonProperty("uid")]
        public long UId { get; internal set; }
        /// <summary>
        /// access_token所属的应用appkey。
        /// </summary>
        [JsonProperty("appkey")]
        public long appKey { get; internal set; }
        /// <summary>
        /// 用户授权的scope权限。
        /// </summary>
        [JsonProperty("scope")]
        public string Scope { get; internal set; }
        /// <summary>
        /// access_token的创建时间，从1970年到创建时间的秒数。
        /// </summary>
        [JsonProperty("expires_in")]
        public long ExpiresIn { get; internal set; }
        /// <summary>
        /// access_token的剩余时间，单位是秒数。
        /// </summary>
        [JsonProperty("create_at")]
        public long CreateAt { get; internal set; }
    }
}
